$(".logout").on("click", function() {
	$("#name").html("");
	$("#name").removeAttr("data-name");
	//window.location = "../../views/pages_doctor/html/login.html";
	$.ajax({
		url: 'http://114.55.38.80:9000/service/logout',
		type: "post",
		data: {

		},
		success: function(d) {
			console.log(d);
			if(d.code == 101) {
				window.location = "../pages_doctor/html/login.html";
			} else {
				alert("服务器丢了！")
			}
		}
	});
});
var msg = window.sessionStorage['user_msg'];
if(!msg){
	window.location = "../pages_doctor/html/login.html";
}
var passowrds = window.sessionStorage['changetime'];
changetimes = JSON.parse(passowrds);
msg = JSON.parse(msg);
if(!changetimes){
	$(".layui-layer-shade,.layui-layer-page,.layui-layer-btn1").show();
	$(".layui-layer-btn1").hide();
}


$("#name").html(msg.name + msg.Job_service+"(客服)");
$("#name").attr("data-name", msg.username);
$("#name").attr("userrole", msg.userrole);
$("#name").attr("data-username", msg.name + msg.Job_service);